import request from "@/utils/request";

export function addCourse(courseAddDTO) {
  return request({
    url: '/course',
    method: 'post',
    data: courseAddDTO
  })
}

export function getCourseVO(id) {
  return request({
    url: `/course/${id}`,
    method: 'get'
  })
}

export function updateCourse(courseAddDTO) {
  return request({
    url: '/course',
    method: 'put',
    data: courseAddDTO
  })
}

export function getCoursePublishVoById(id) {
  return request({
    url: `/course/publish/${id}`,
    method: 'get'
  })
}
